package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name = "T_SYS_COMPANY_2_BANK", schema = "oa", catalog = "")
public class Company2bankEntity extends BaseEntity implements Serializable {

    private String companyId;
    private String bankName;
    private String bankCard;
    private Integer sortNo;

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCard() {
        return bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID", this.getId());
        json.put("COMPANY_ID", this.getCompanyId());
        json.put("BANK_NAME", this.getBankName());
        json.put("SORT_NO", this.getSortNo());
        json.put("BANK_CARD", this.getBankCard());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_COMPANY_2_BANK";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID", "id");
        json.put("COMPANY_ID", "companyId");
        json.put("BANK_NAME", "bankName");
        json.put("BANK_CARD", "bankCard");
        json.put("SORT_NO", "sortNo");
        return json;
    }
}
